<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=utf-8" />
    <title>
      6.26.&nbsp;Psmisc-22.21
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body class="lfs" id="lfs-8.0">
    <div class="navheader">
      <h4>
        Linux From Scratch - Version 8.0
      </h4>
      <h3>
        第六章&nbsp;安装基本系统软件
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="shadow.html" title="Shadow-4.4">上一页</a>
          <p>
            Shadow-4.4
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="iana-etc.html" title=
          "Iana-Etc-2.30">下一页</a>
          <p>
            Iana-Etc-2.30
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter06.html" title=
          "第六章&nbsp;安装基本系统软件">返回</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 8.0 ">主页</a>
        </li>
      </ul>
    </div>
    <div class="wrap" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="ch-system-psmisc" name="ch-system-psmisc"></a>6.26.
        Psmisc-22.21
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <p>
          Psmisc 软件包包含用于显示进程信息的程序。
        </p>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">预计构建时间:</strong>
              <span class="segbody">少于 0.1 SBU</span>
            </div>
            <div class="seg">
              <strong class="segtitle">所需磁盘空间:</strong>
              <span class="segbody">4.0 MB</span>
            </div>
          </div>
        </div>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          6.26.1. 安装 Psmisc
        </h2>
        <p>
          准备编译 Psmisc 软件包:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr</kbd>
</pre>
        <p>
          编译该软件包:
        </p>
        <pre class="userinput">
<kbd class="command">make</kbd>
</pre>
        <p>
          该软件包不含测试套件。
        </p>
        <p>
          安装该软件包:
        </p>
        <pre class="userinput">
<kbd class="command">make install</kbd>
</pre>
        <p>
          最终，将<span class=
          "command"><strong>killall</strong></span> 和 <span class=
          "command"><strong>fuser</strong></span> 程序移至 FHS 指定的位置:
        </p>
        <pre class="userinput">
<kbd class="command">mv -v /usr/bin/fuser   /bin
mv -v /usr/bin/killall /bin</kbd>
</pre>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          <a id="contents-psmisc" name="contents-psmisc"></a>6.26.2. Psmisc 的内容
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">安装的程序:</strong>
              <span class="segbody">fuser, killall, peekfd, prtstat, pstree,
              and pstree.x11 (link to pstree)</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            简要描述
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="fuser" name="fuser"></a><span class=
                    "term"><span class=
                    "command"><strong>fuser</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    报告正在使用特定文件或者文件系统的进程ID(PIDs)
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="killall" name="killall"></a><span class=
                    "term"><span class=
                    "command"><strong>killall</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    杀死指定名称的进程; 它向所有名称相符的进程发送一个信号
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="peekfd" name="peekfd"></a><span class=
                    "term"><span class=
                    "command"><strong>peekfd</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    查看运行过程的文件描述符，给出了它的PID
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="prtstat" name="prtstat"></a><span class=
                    "term"><span class=
                    "command"><strong>prtstat</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    打印进程信息
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pstree" name="pstree"></a><span class=
                    "term"><span class=
                    "command"><strong>pstree</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    以树形结构显示正在运行的进程
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pstree.x11" name="pstree.x11"></a><span class=
                    "term"><span class=
                    "command"><strong>pstree.x11</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    与 <span class=
                    "command"><strong>pstree</strong></span>命令类似, 但是该命令会在退出前等待确认
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="shadow.html" title="Shadow-4.4">上一页</a>
          <p>
            Shadow-4.4
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="iana-etc.html" title=
          "Iana-Etc-2.30">下一页</a>
          <p>
            Iana-Etc-2.30
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter06.html" title=
          "第六章&nbsp;安装基本系统软件">返回</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 8.0 ">主页</a>
        </li>
      </ul>
    </div>
  </body>
</html>
